package com.abner.springcloudprovideruser.entity;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
public class User implements Serializable {
    /**
     * 唯一标识
     */
    private String id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 姓名
     */
    private String name;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 余额
     */
    private BigDecimal balance;

    /**
     * user
     */
    private static final long serialVersionUID = 1L;

   /* *//**
     * 唯一标识
     * @return id 唯一标识
     *//*
    public String getId() {
        return id;
    }

    *//**
     * 唯一标识
     * @param id 唯一标识
     *//*
    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    *//**
     * 用户名
     * @return username 用户名
     *//*
    public String getUsername() {
        return username;
    }

    *//**
     * 用户名
     * @param username 用户名
     *//*
    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    *//**
     * 姓名
     * @return name 姓名
     *//*
    public String getName() {
        return name;
    }

    *//**
     * 姓名
     * @param name 姓名
     *//*
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    *//**
     * 年龄
     * @return age 年龄
     *//*
    public Integer getAge() {
        return age;
    }

    *//**
     * 年龄
     * @param age 年龄
     *//*
    public void setAge(Integer age) {
        this.age = age;
    }

    *//**
     * 余额
     * @return balance 余额
     *//*
    public BigDecimal getBalance() {
        return balance;
    }

    *//**
     * 余额
     * @param balance 余额
     *//*
    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        User other = (User) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
            && (this.getBalance() == null ? other.getBalance() == null : this.getBalance().equals(other.getBalance()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
        result = prime * result + ((getBalance() == null) ? 0 : getBalance().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", name=").append(name);
        sb.append(", age=").append(age);
        sb.append(", balance=").append(balance);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }*/
}